const mongoose = require('./db');
let rigisterSchema = new mongoose.Schema({
    phone: String,
    password: String,
    createdAt: {
        type: Date,
        default: Date.now  // 用户创建时间
    },
    username: String,
    nickname: String,
    sex:String,
    idcard: String,
    birthday: String,
    address: String,
    desc:   String,
    height:Number,
    weight: Number,
    nation :String,
    contactphone: String,
    imgpath: String,
    firend:Array

})
let tokenSchema = new mongoose.Schema({
    token:String,
})
let tokenModel = mongoose.model('token', tokenSchema,'token')
let rigisterModel = mongoose.model('register', rigisterSchema,'register')
module.exports = { 
    rigisterModel,tokenModel
 }

